<style type="text/css">
    /*头部样式*/
    .legend-tip {
        color: #f00;
        font-size: 14px;
        margin-left: 5px;
    }

    /*规格样式*/
    .skuChildren {
        margin-right: 10px;
        margin-top: 10px;
        padding: 0 5px;
        height: 24px;
        line-height: 24px;
        color: rgba(80, 80, 80, 1);
        border-radius: 2px;
        font-size: 12px;
        text-align: center;
        border: 1px solid rgba(231, 231, 231, 1);
        position: relative;
    }

    /*规格值*/
    .skuChildrenBox {
        display: flex;
        padding: 0 15px;
        flex-wrap: wrap;
    }

    /*规格小叉号*/
    .skuChildren-close {
        position: absolute;
        background: rgba(212, 48, 48, 1);
        color: #fff;
        border-radius: 50%;
        width: 12px;
        height: 12px;
        top: -6px;
        right: -6px;
        font-style: 12px;
        -webkit-transform: scale(0.8);
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
	<div class="form-group" >
	    <label class="control-label col-xs-12 col-sm-2">选择网站:</label>
	    <div class="col-xs-12 col-sm-8" >
	        <input id="c-type" data-rule="required" data-source='[{"id":"1","title":"鑫互助"},{"id":"2","title":"小鑫充电"}]' data-field="title" class="form-control selectpage" name="row[type]" type="text" value="" data-pagination="false">
	    </div>
	</div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_name" data-rule="required" class="form-control" name="row[goods_name]" type="text">
        </div>
    </div>
	<div class="form-group" >
	    <label class="control-label col-xs-12 col-sm-2">商品类型:</label>
	    <div class="col-xs-12 col-sm-8" >
	        <input id="c-state" data-rule="required" data-source='[{"id":"1","title":"抢购"},{"id":"2","title":"秒杀"}]' data-field="title" class="form-control selectpage" name="row[state]" type="text" value="" data-pagination="false">
	    </div>
	</div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
	<div class="form-group">
		<label for="c-avatar" class="control-label col-xs-12 col-sm-2">轮播图:</label>
		<div class="col-xs-12 col-sm-8">
			<div class="input-group">
				<input id="c-avatar"  data-rule="required" class="form-control" size="50" name="row[carousel_image]" type="text" value="">
				<div class="input-group-addon no-border no-padding">
					<span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-avatar"><i class="fa fa-upload"></i> 上传</button></span>
					<span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> 选择</button></span>
				</div>
				<span class="msg-box n-right" for="c-avatar"></span>
			</div>
			<ul class="row list-inline plupload-preview" id="p-avatar"></ul>
		</div>
	</div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">价格:</label>
        <div class="col-xs-12 col-sm-8" >
            <input id="c-price" data-rule="required" class="form-control" name="row[price]" type="number">
        </div>
    </div>
	<div class="form-group">
	     <label class="control-label col-xs-12 col-sm-2">库存:</label>
	     <div class="col-xs-12 col-sm-8" >
	         <input id="c-stock" data-rule="required" class="form-control" name="row[stock]"  type="number">
	     </div>
	</div>
	<div class="form-group">
	    <label class="control-label col-xs-12 col-sm-2">状态:</label>
	    <div class="col-xs-12 col-sm-8">
	        {:build_radios('row[is_enable]', ['1'=>__('Normal'), '0'=>__('Hidden')])}
	    </div>
	</div>
	<div class="form-group">
	    <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
	    <div class="col-xs-12 col-sm-8">
	        <input id="c-sort" data-rule="required" class="form-control" name="row[sort]" type="number" value="0">
	    </div>
	</div>
	<div class="widget-body no-padding">
		<div class="form-group">
			<legend></legend>
		</div>
		<div id='space'>
			<div class="form-group skuMain">
				<label class="control-label col-xs-12 col-sm-2">规格:</label>
				<div class="col-xs-4 col-sm-4"><input type="text" data-rule="required" name="attr[]" maxlength="22" placeholder="请输入规格名称"  class="form-control"></div>
				<div class="col-xs-4 col-sm-4"><span class="btn btn-primary">添加</span> </div>
				<div class="col-xs-8 col-sm-8 col-xs-offset-2 col-sm-offset-2 skuChildrenBox"></div>
			</div>
		</div>
	</div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">详情:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-describe" data-rule="" class="form-control editor " rows="5" name="row[introduction]" cols="50"></textarea>
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>


